package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "t_deviceextend")
public class TDeviceExtend implements Serializable{
		private static final long serialVersionUID = 1L;
		@Id
	    @GeneratedValue(strategy = GenerationType.IDENTITY)
	    @Basic(optional = false)
	    @Column(name = "sid")
	    private Integer sid;
	    @Column(name = "sname")
	    private String sname;
	    @Column(name = "stel")
	    private String stel;
	    @Column(name = "sn")
	    private String sn;
	    @JoinColumn(name = "spcode", referencedColumnName = "spcode")   
		@ManyToOne
	    private TSpcode spcode;		  
	    @Column(name = "job")
	    private String job;
	    @Column(name = "sadress")
	    private String sadress;
	    @Column(name = "smobile")
	    private String smobile;
	    @Column(name = "hasclientid")
	    private Integer hasclientid;
	    @Column(name = "clientid")
	    private Integer clientid;
	    
	    public TDeviceExtend(){
	    	
	    }
	    public TDeviceExtend(Integer sid){
	    	this.sid=sid;
	    }
		public Integer getSid() {
			return sid;
		}
		public void setSid(Integer sid) {
			this.sid = sid;
		}
		public String getSname() {
			return sname;
		}
		public void setSname(String sname) {
			this.sname = sname;
		}
		public String getStel() {
			return stel;
		}
		public void setStel(String stel) {
			this.stel = stel;
		}
		public String getSn() {
			return sn;
		}
		public void setSn(String sn) {
			this.sn = sn;
		}
		public TSpcode getSpcode() {
			return spcode;
		}
		public void setSpcode(TSpcode spcode) {
			this.spcode = spcode;
		}
		
		public String getJob() {
			return job;
		}
		public void setJob(String job) {
			this.job = job;
		}
		public String getSadress() {
			return sadress;
		}
		public void setSadress(String sadress) {
			this.sadress = sadress;
		}
		public String getSmobile() {
			return smobile;
		}
		public void setSmobile(String smobile) {
			this.smobile = smobile;
		}
		public Integer getHasclientid() {
			return hasclientid;
		}
		public void setHasclientid(Integer hasclientid) {
			this.hasclientid = hasclientid;
		}
		public Integer getClientid() {
			return clientid;
		}
		public void setClientid(Integer clientid) {
			this.clientid = clientid;
		}
		@Override
	    public int hashCode() {
	        int hash = 0;
	        hash += (sid != null ? sid.hashCode() : 0);
	        return hash;
	    }

	    @Override
	    public boolean equals(Object object) {
	        if (!(object instanceof TDeviceExtend)) {
	            return false;
	        }
	        TDeviceExtend other = (TDeviceExtend) object;
	        if ((this.sid == null && other.sid != null) || (this.sid != null && !this.sid.equals(other.sid))) {
	            return false;
	        }
	        return true;
	    }

	    @Override
	    public String toString() {
	        return "com.dp.vo.TDeviceExtend[sid=" + sid + "]";
	    }
	    
}
